<template>
  <div id="box"></div>
</template>

<script>
export default {
  name: "Amis",
  mounted: () => {
    let amis = amisRequire("amis/embed");
    console.log(amis);

    let amisJSON = {
      type: "page",
      title: "表单页面",
      body: {
        type: "form",
        mode: "horizontal",
        api: "/saveForm",
        body: [
          {
            label: "Name",
            type: "input-text",
            name: "name",
          },
          {
            label: "Email",
            type: "input-email",
            name: "email",
          },
        ],
      },
    };

    amis.embed("#box", amisJSON);
  },
};
</script>